package com.azt.provider.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.azt.api.pojo.AlertMsg;
import com.azt.api.service.AlertMsgService;
import com.azt.provider.mapper.AlertMsgMapper;

@Service
@Transactional
public class AlertMsgServiceImpl  implements AlertMsgService{
	
	@Autowired
	private AlertMsgMapper am;


	@Override
	public int getMsgNOReadCount(Integer userid, Integer shenfen) {
		return am.getMsgNOReadCount(userid, shenfen);
	}

	@Override
	public AlertMsg saveAlertMsg(AlertMsg msg) {
		if(msg.getId() != null) am.updateByPrimaryKey(msg);
		else am.insert(msg);
		return  msg;
	}
	
}

